Skip to content

Log client addresses in scheduler lifecycle messages#9270

Open
peter941221 wants to merge 8 commits into
dask:mainfrom
peter941221:feat/issue-8000-client-address-logs
Open

Log client addresses in scheduler lifecycle messages#9270
peter941221 wants to merge 8 commits into
dask:mainfrom
peter941221:feat/issue-8000-client-address-logs

Conversation

@peter941221

Copy link
Copy Markdown
Contributor

Summary

  • include the client's remote address in the scheduler log messages for client connect, remove, and close events
  • store the peer address on ClientState so the same address is available throughout the client lifecycle
  • add a scheduler test covering the new log output

Closes #8000

Testing

  • python -m py_compile distributed/scheduler.py distributed/tests/test_scheduler.py
  • not run: python -m pytest distributed/tests/test_scheduler.py -k client_connection_logs_include_address (local environment is missing dask, so pytest fails during config import)

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    40 files  +    1      40 suites  +1   14h 37m 47s ⏱️ + 1h 7m 32s
 4 155 tests ±    0   3 967 ✅  -     6    179 💤  -   1   9 ❌ + 7 
80 862 runs  +3 018  76 537 ✅ +2 731  4 242 💤 +206  83 ❌ +81 

For more details on these failures, see this check.

Results for commit acf771d. ± Comparison against base commit 20d80c9.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
distributed.cli.tests.test_dask_worker.test_listen_address_ipv6[tcp:..[ ‑ 1]:---nanny]
distributed.cli.tests.test_dask_worker.test_listen_address_ipv6[tcp:..[ ‑ 1]:---no-nanny]
distributed.tests.test_scheduler ‑ test_client_connection_logs_include_address
distributed.tests.test_scheduler ‑ test_synthetic_client_logs_internal_address
This pull request skips 1 test.
distributed.deploy.tests.test_ssh ‑ test_defer_to_old

♻️ This comment has been updated with latest results.

@peter941221 peter941221 marked this pull request as ready for review May 29, 2026 10:17
@peter941221 peter941221 requested a review from fjetter as a code owner May 29, 2026 10:17
Comment thread distributed/tests/test_scheduler.py Outdated
Comment thread distributed/scheduler.py Outdated
@peter941221

Copy link
Copy Markdown
Contributor Author

Current red jobs look unrelated to this patch.

This PR only changes distributed/scheduler.py and distributed/tests/test_scheduler.py, and the scheduler-specific py314 jobs are green. The red ubuntu-latest mindeps-array test-ci not ci1 job fails in distributed/tests/test_config.py::test_logging_default[None].

Comment thread distributed/scheduler.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log address of clients in scheduler log

2 participants